#ifndef NANE_IMODULESYSTEM_H
#   define NANE_IMODULESYSTEM_H

#   include "nane/core/ISubSystem.h"
#   include "nane/core/crt/IModule.h"

namespace nane 
{
    struct IModuleSystem
        : public ISubSystem
    {
        struct ModuleApplyBase
        {
            virtual void Apply( IModule* _module ) = 0;
        };
        
        virtual bool RegisterStaticModule( const ModuleInfo* _moduleInfo ) = 0;
        virtual IModule* LoadModule( const char* _moduleName ) = 0;
        virtual IModule* GetModuleByInterface( const char* _interfaceName ) = 0;
        virtual void ForeachModule( const char* _interfaceName, ModuleApplyBase* _functor ) = 0;
        //virtual void releaseModule( IModule* _moduleHandle ) = 0;
    };
}   // namespace nane

#endif	// NANE_IMODULESYSTEM_H
